package cn.flying.cloud.system.model;

import java.io.Serializable;
import java.util.Objects;
import java.util.Set;

/**
 * 岗位领域模型
 *
 * @author: admin
 * @date: 2023年06月12日 19:07
 * @version: 1.0
 */
public class Position implements Serializable {
    /**
     * 主键ID
     */
    private Long id;

    /**
     * 岗位编码
     */
    private String postId;

    /**
     * 岗位名称
     */
    private String postName;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 扩展字段1
     */
    private String ext1;

    /**
     * 扩展字段2
     */
    private String ext2;

    /**
     * 扩展字段3
     */
    private String ext3;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 所属用户
     */
    private Set<User> users;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPostId() {
        return postId;
    }

    public void setPostId(String postId) {
        this.postId = postId == null ? null : postId.trim();
    }

    public String getPostName() {
        return postName;
    }

    public void setPostName(String postName) {
        this.postName = postName == null ? null : postName.trim();
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark == null ? null : remark.trim();
    }

    public String getExt1() {
        return ext1;
    }

    public void setExt1(String ext1) {
        this.ext1 = ext1 == null ? null : ext1.trim();
    }

    public String getExt2() {
        return ext2;
    }

    public void setExt2(String ext2) {
        this.ext2 = ext2 == null ? null : ext2.trim();
    }

    public String getExt3() {
        return ext3;
    }

    public void setExt3(String ext3) {
        this.ext3 = ext3 == null ? null : ext3.trim();
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId == null ? null : tenantId.trim();
    }

    public Set<User> getUsers() {
        return users;
    }

    public void setUsers(Set<User> users) {
        this.users = users;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Position position = (Position) o;
        return Objects.equals(id, position.id) && Objects.equals(postId, position.postId) && Objects.equals(postName, position.postName) && Objects.equals(status, position.status) && Objects.equals(remark, position.remark) && Objects.equals(ext1, position.ext1) && Objects.equals(ext2, position.ext2) && Objects.equals(ext3, position.ext3) && Objects.equals(tenantId, position.tenantId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, postId, postName, status, remark, ext1, ext2, ext3, tenantId);
    }
}